package com.lixia.lxframework.framework.system.constant;

import org.springframework.stereotype.Component;

/**
 * @作者 Mr.wang
 * @功能描述 登录常量类
 * @日期 2019/3/4
 */
@Component
public interface LoginConstants {

    /**
     * 视图路径-登录页
     */
    String REDIRECT_VIEW_URL_INDEX = "redirect:/";

    /**
     * 视图路径-首页
     */
    String REDIRECT_VIEW_URL_HOME = "redirect:/sys/home";
    String VIEW_URL_INDEX = "index";
    String VIEW_URL_HOME = "/system/home";
    String VIEW_URL_REGISTER = "/system/register";
    String VIEW_URL_SELECT_MODULE = "/system/select_module";
    String VIEW_URL_ERROR_PAGE = "/system/errorException";
    String VIEW_URL_NOTFOUND_PAGE = "/system/error404";

    /**
     * 加密算法
     */
    String LOGIN_ALGORITHM_NAME = "MD5";
    /**
     * 加密次数
     */
    int LOGIN_HASH_ITERATIONS = 2;

    /**********************************登录信息编码、信息-开始**********************************/
    int LOGIN_SUCCESS_CODE = 200;
    String LOGIN_SUCCESS_MSG = "登录成功!";

    int LOGIN_INCORRECT_PASSWORD_CODE = 501;
    String LOGIN_INCORRECT_PASSWORD_MSG = "账号或密码错误!";

    int LOGIN_LOCKED_ACCOUNT_CODE = 502;
    String LOGIN_LOCKED_ACCOUNT_MSG = "用户被锁定!";

    int LOGIN_DISABLED_ACCOUNT_CODE = 503;
    String LOGIN_DISABLED_ACCOUNT_MSG = "用户被禁用!";

    int LOGIN_UNKNOWN_ACCOUNT_CODE = 504;
    String LOGIN_UNKNOWN_ACCOUNT_MSG = "用户不存在!";

    int LOGIN_UNKNOWN_USER_CODE = 505;
    String LOGIN_UNKNOWN_USER_MSG = "用户信息不存在!";

    int LOGIN_PHONE_EXISTS_CODE = 506;
    String LOGIN_PHONE_EXISTS_MSG = "手机号已存在!";

    int LOGIN_USER_ERROR_CODE = 507;
    String LOGIN_USER_ERROR_MSG = "获取用户信息失败!";

    int LOGIN_VERIFICATION_CODE_EXPIRED_CODE = 508;
    String LOGIN_VERIFICATION_CODE_EXPIRED_MSG = "验证码已过期!";

    int LOGIN_VERIFICATION_CODE_ERROR_CODE = 509;
    String LOGIN_VERIFICATION_CODE_ERROR_MSG = "验证码错误!";

    int LOGIN_AUTHENTICATION_ERROR_CODE = 510;
    String LOGIN_AUTHENTICATION_ERROR_MSG = "凭据异常!";

    int EX_REQUIRED_PARAMS_EMPTY_CODE = 515;
    String EX_REQUIRED_PARAMS_EMPTY_MSG = "必填参数不能为空!";

    int EX_PARAMS_FORMAT_ERROR_CODE = 516;
    String EX_PARAMS_FORMAT_ERROR_MSG = "参数格式不正确!";


    int LOGIN_ACCOUNT_EXISTS_CODE = 517;
    String LOGIN_ACCOUNT_EXISTS_MSG = "用户名已存在!";

    int EX_OLD_PASSWORD_INCORRECT_CODE = 518;
    String EX_OLD_PASSWORD_INCORRECT_MSG = "输入的旧密码不正确!";

    int EX_USERANME_EMPTY_CODE = 519;
    String EX_USERANME_EMPTY_MSG = "账户不能为空!";

    int EX_PASSWORD_EMPTY_CODE = 520;
    String EX_PASSWORD_EMPTY_MSG = "密码不能为空!";

    int EX_PHONE_EMPTY_CODE = 521;
    String EX_PHONE_EMPTY_MSG = "手机号不能为空!";

    int EX_PHONE_EXISTS_CODE = 522;
    String EX_PHONE_EXISTS_MSG = "手机号已存在!";

    int EX_DATA_EXIST_CODE = 523;
    String EX_DATA_EXIST_MSG = "数据已存在!";

    int EX_DATA_NOT_EXIST_CODE = 524;
    String EX_DATA_NOT_EXIST_MSG = "数据不存在!";

    /**********************************登录信息编码、信息-结束**********************************/
}
